<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>draw.io Editor</title>
<script type="text/javascript">
	// To Avoid NPE in connectUtils
	urlParams = {};
</script>
<script src="connectUtils-1-4-8.js" type="text/javascript"></script>
<style type="text/css">
	html, body {
	  height:100%;
	  overflow:hidden;
	}
	body {
		background-color:#ffffff;
		background-image:url(/images/drawlogo-text-bottom.svg);
		background-repeat:no-repeat;
		background-position:center;
		background-size:128px;
		font-family:Arial,Sans-Serif;
		overflow:hidden;
		width:100%;
		margin:0;
	}
</style>
</head>
<body>
<script type="text/javascript">
	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
	var head = document.getElementsByTagName('head')[0];
	
	var script = document.createElement('script');
	script.setAttribute('data-options', 'resize:false;margin:false');
	
	// Main
	script.onload = function()
	{
		// TODO: Try avoid this by using workaround in EditorUi.fileLoaded on line 2200
		//Firefox has a problem with focusing the can be fixed with a chrome dialog
		if(navigator.userAgent.indexOf('Firefox/') >= 0)
		{
			AP.dialog.create(
	        {
	    		key: 'splashEditor',
	    		header: 'draw.io',
	            chrome: true,
	            width: "50%",
	            height: "50%",
	        }).on("close", function(flags)
        	{
	        	AP.dialog.close();
	        	AP.confluence.closeMacroEditor();
    		});
			AP.dialog.getButton('submit').hide();
			//Confluence refuse to hide cancel button!!!
			AP.dialog.getButton('cancel').hide();
		}
		else
		{
			AP.dialog.create(
	        {
	    		key: 'macroEditor',
	    		customData: {},
	            chrome: false,
	            width: "100%",
	            height: "100%",
	        }).on("close", function(flags)
        	{
	        	AP.confluence.closeMacroEditor();
    		});
		}
	};
	script.src = 'https://connect-cdn.atl-paas.net/all.js';
	head.appendChild(script);
</script>
</body>
</html>
